package android.demo;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.EditText;

public class Activity2 extends Activity{
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.activity2);
	}
	public void ClickOk(View v){
		Intent i= new Intent();
		EditText txtTen= (EditText) findViewById(R.id.txt_ten);
		EditText txtTuoi= (EditText)findViewById(R.id.txt_tuoi);
		i.putExtra("ten", txtTen.getText().toString());
		i.putExtra("tuoi", txtTuoi.getText().toString());
		setResult(RESULT_OK,i);
		finish();
	}

}
